class JsBridgeData<T> {
  int? code;
  String? message;
  T? data;

  JsBridgeData({this.code, this.message, this.data});

  JsBridgeData.ok({this.data}){
    this.code = 0;
    this.message = "ok";
  }

  JsBridgeData.fail({this.message}){
    this.code = -1;
  }

  Map<String, dynamic> toJson() {
    final map = <String,dynamic>{};
    map['code'] = code;
    map['message'] = message;
    map['data'] = data;
    return map;
  }
}
